//---------------------------------------------------------------------------

#ifndef CImageH
#define CImageH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include "CtrlStd.h"
//---------------------------------------------------------------------------
class PACKAGE_CTRLSTD CImage : public TImage
{
private:
    typedef CImage inherited;
    
    TImageList*         m_Images;
    TImageIndex         m_ImageIndex;
    bool                m_Transparent;
    bool                m_AutoSize;

private:
    void   __fastcall SetImages(     TImageList* pImages)     { m_Images      = pImages;     Afficher(); };
    void   __fastcall SetImageIndex( TImageIndex nImageIndex) { m_ImageIndex  = nImageIndex; Afficher(); };
    void   __fastcall SetTransparent(bool        bTranparent) { m_Transparent = bTranparent; Afficher(); };
    void   __fastcall SetAutoSize(   bool        bAutoSize)   { m_AutoSize    = bAutoSize;   Afficher(); };

    void   __fastcall Afficher(void);

protected:

__published:
    __property TImageList*    Images      = {read = m_Images,       write = SetImages      };
    __property TImageIndex    ImageIndex  = {read = m_ImageIndex,   write = SetImageIndex  };
    __property bool           Transparent = {read = m_Transparent,  write = SetTransparent };
    __property bool           AutoSize    = {read = m_AutoSize,     write = SetAutoSize    };

public:
    __fastcall CImage(TComponent* Owner);
};
//---------------------------------------------------------------------------
#endif
